<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script>
    function pop(){
        var str = document.getElementById("001").value;
        alert(str);
    }
    function check(){
        var str = document.getElementById("002").value;
        if(str!="admin"){
            alert("用户名输入错误");
        }
    }
</script>
<body>
   <form action="user/register" method="POST">
        <table border="1" width="64%" align="center"> 
            <h2 align="center">用户注册表</h2>
            <tr>
                <td>用户名：</td>
                    <td>
                        <input type="text" name="username" id="002" onblur="check()">
                    </td>
            </tr>
            <tr>
                <td>密码：</td>
                <td>
                    <input type="password" name="password">
                </td>
            </tr>
            <tr>
                <td>性别：</td>
                <td>
                    <input type="radio" name="sex" >男
                    <input type="radio" name="sex" >女
                </td>
            </tr>
            <tr>
                <td>学历：</td>
                <td>
                    <select name="degree">
                        <option>--请选择学历--</option>
                        <option>本科</option>
                        <option>专科</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>自我介绍：</td>
                <td><textarea name="intro" id="001" cols="60" rows="7"></textarea></td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <button onclick="pop()">注册</button>
                </td>
            </tr>
        </table>
   </form> 
</body>
</html>